package com.vitabuybuy.tv.ui.mine.setting.viewmodel

import com.library.common.base.BaseViewModel
import com.library.common.base.MessageModel
import com.library.common.ext.rxHttpRequest
import com.library.common.net.error.msg
import com.library.common.toast.XToast
import com.vitabuybuy.tv.network.SettingRepository

class FeelBackViewModel : BaseViewModel(){
    fun saveFeelBack(content:String){
        rxHttpRequest {
            onRequest = {
                SettingRepository.saveFeelBack(content).await()
                defUI.msgEvent.postValue(MessageModel(1))
            }
            onError={
                XToast.normal(it.msg)
            }
        }
    }
}
